srcdir = '.'
blddir = 'build'
VERSION = '0.0.1'

def set_options(opt):
  opt.tool_options('compiler_cc')
  opt.tool_options('compiler_cxx')

def configure(conf):
  conf.check_tool('compiler_cc')
  conf.check_tool('compiler_cxx')
  conf.check_tool('node_addon')
  conf.env.append_unique('CXXFLAGS', ['-Wall', '-O3', '-I/opt/ACE_wrappers'])
  conf.env['LIBPATH_ACE'] = '/opt/ACE_wrappers/lib'
  conf.env['LIB_ACE'] = 'ACE'

def build(bld):
  obj = bld.new_task_gen('cc', 'cxx', 'cshlib', 'node_addon', uselib="ACE")
  obj.target = 'addon'
  obj.source = 'addon.cc','MDNS_Object.cc', 'Reply_Handler.cpp','Announce_Handler.cpp', 'mdns.c', 'mdnsd.c'
